package com.dmall.rpc.service.impl;

import com.dmall.rpc.server.RpcService;
import com.dmall.rpc.service.Student;
import com.dmall.rpc.service.StudentService;

import java.util.Arrays;
import java.util.List;

@RpcService(StudentService.class)
public class StudentServiceImpl implements StudentService {
    @Override
    public String getStudentName(Integer studentId) {
        Student student = new Student(studentId, "Test", 0);
        return student.getName();
    }

    @Override
    public Student getStudent(Integer studentId) {
        return new Student(studentId, "test", 0);
    }

    @Override
    public List<Student> getStudentList(String name, Integer age) {
        return Arrays.asList(new Student(1, name, age), new Student(2, name, age), new Student(3, name, age));
    }
}
